const { DataTypes } = require("sequelize");
const seq = require("../db/seq.js");
const Fields = seq.define(
  "fields",
  {
    fieldId: {
      type: DataTypes.INTEGER,
      allowNull: false,
      autoIncrement:true,
      primaryKey: true,
      comment: "字段ID",
    },
    fieldName: {
      type: DataTypes.STRING,
      allowNull: false,
      defaultValue:'',
      comment: "字段名称",
    },
    fieldModel: {
      type: DataTypes.STRING,
      allowNull: false,
      defaultValue:'',
      comment: "字段模式，主要用是于标字段给哪个表来用",
    },
    fieldType: {
      type: DataTypes.STRING,
      allowNull: false,
      defaultValue:'',
      comment: "字段类型",
    },
    dataFlag:{
      type:DataTypes.TINYINT,
      allowNull:false,
      defaultValue:1,
      comment:"删除标志"
    }
  },
  {
    freezeTableName: true,
    timestamps: false,
  }
);
module.exports = Fields;